<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="/wondershare/js/jquery.js"></script> 
<script src="/wondershare/js/utils.js"></script> 
<script src="/wondershare/js/topic.js"></script> 
<link href="/wondershare/styles/main.css" rel="stylesheet" type="text/css" />
<link href="/wondershare/styles/general.css" rel="stylesheet" type="text/css" />
<title>tag管理</title>
<script type="text/javascript">
//note 生成HTML
function createHtml( table, field_id, key_id ){
	$("#create_tip_"+key_id).html( '正在生成...' );
	$.get('../bin/docList_'+table+'.php?action=pub&TID='+table+'&field_id='+field_id+'&key_id='+key_id+'&ajax_pub=1',function(data){
		if( parseInt(data) == 1 ){
			$("#create_tip_"+key_id).html( '生成成功' );
		}else if( data == 'empty' ){
			document.location.href = '../bin/doc_'+table+'.php?field_id='+field_id+'&key_id='+key_id;
		}else{
			$("#create_tip_"+key_id).html( '生成失败' );
		}
	});
}
</script>
</head>
<body>
<h1>
<span class="action-span">
<a href="/wondershare/tag.php?action=index&act=add&w_type=<{$w_type}>">添加标签</a>
</span>
<span class="action-span1">
<a href="/wondershare/article.php?action=index&w_type=<{$w_type}>"><{$web_info}>网站文章信息</a>
</span>
<span id="search_id" class="action-span1"> > 标签列表 </span>
<div style="clear:both"></div>
</h1>
<form method="POST" action="/wondershare/tag.php?action=index&w_type=<{$w_type}>">
    <img height="22" border="0" width="26" alt="SEARCH" src="images/icon_search.gif">

    <!-- 热门 -->
    热门否：<select name="is_hot">
	<option value="0" <{if $is_hot == 0}> selected="selected" <{/if}>>全部</option>
	<option value="1" <{if $is_hot == 1}> selected="selected" <{/if}>>热门标签</option>
	<option value="2" <{if $is_hot == 2}> selected="selected" <{/if}>> 一般标签</option></select>
	<input type="hidden"  name="tag_type" value="0"/>
    <input type="hidden"  name="tag_web" value="0"/>    
    <input type="hidden"  name="w_type" id="w_type" value="<{$w_type}>"/>    
    
        <!-- 关键字 -->
    标题： <input type="text" size="25" name="tag_name" value="<{$tag_name|escape}>">
    <input type="submit" class="button"  name="search" value=" 搜索 ">
</form>

<table width="100%" cellspacing="1" cellpadding="2" id="list-table" class="list-div">
<tbody>
  <tr>
    <th width="5%">ID</th>
    <th>标题</th>
	<th width="5%">点击数量</th>
	<th width="4%">热门标签</th>
    <th width="9%" >作者</th>
	<th width="9%">文章数量</th>
	<th width="12%" >生成时间</th>
	<th width="9%">生成状态</th>
	<th width="6%">预览</th>
    <th width="19%">操作</th>
  </tr>
<{foreach from=$tag_info item=tag}>
  <tr id="tr_<{$tag.tag_id}>">

	<td align="center"><input value="<{$tag.tag_id}>" name="ID[]" type="checkbox" > <{$tag.tag_id}> </td>	
	<td align="center" id="td_tagname_<{$tag.tag_id}>"><span onmouseout="check_css('tagname_<{$tag.tag_id}>',0);" onmouseover="check_css('tagname_<{$tag.tag_id}>',1);" onclick="check_info(<{$w_type}>,'<{$tag.tag_id}>','tagname_<{$tag.tag_id}>','td_tagname_<{$tag.tag_id}>','200','tag_name');" id="tagname_<{$tag.tag_id}>" ><{$tag.tag_name|escape}></span></td>
	
	<td align="center" id="td_click_count_<{$tag.tag_id}>"><span onmouseout="check_css('click_count_<{$tag.tag_id}>',0);" onmouseover="check_css('click_count_<{$tag.tag_id}>',1);" onclick="check_info(<{$w_type}>,'<{$tag.tag_id}>','click_count_<{$tag.tag_id}>','td_click_count_<{$tag.tag_id}>','30','tag_click_count');"  id="click_count_<{$tag.tag_id}>" ><{$tag.click_count}></span></td>
	
	<td align="center"><img id="hot_<{$tag.tag_id}>" onclick="change_image('hot_<{$tag.tag_id}>',<{$tag.tag_id}>,'hot','tag')" <{if $tag.is_hot == 1}>src="/wondershare/images/yes.gif" <{else}>src="/wondershare/images/no.gif" <{/if}> /></td>
	
	<td align="center"><{if $tag.add_user == '' }> <{$tag.update_user}> <{else}> <{$tag.add_user}> <{/if}></td>
	<td align="center"><p id="list_count_<{$tag.tag_id}>" ><{$tag.count}></p></td>	
	<td align="center"><{$tag.pub_time}></td>
	<td align="center" id="create_tip_<{$tag.tag_id}>"><span style="color:#FF0000"><{if $tag.pub_status == 1}>已生成html<{/if}></span></td>
    <td align="center"><{if $tag.template_url neq '' && $tag.template_url neq '0'}> <a href="<{$tag.template_url}>"  target="_blank" >预览</a> <{/if}></td>
	<td align="center">
        <a href="#" onclick="delete_article(<{$tag.tag_id}>,'in_delete','tag')" >删除</a> | 
        <a href="/wondershare/tag.php?action=index&act=edit&tag_id=<{$tag.tag_id}>&w_type=<{$w_type}>" > 编辑 </a>| 
        <a href="<{if $tag.pub_status == 1}>javascript:createHtml(<{$site_config.table}>,<{$site_config.field_id}>,<{$tag.tag_id}>);<{else}>../bin/doc_<{$site_config.table}>.php?field_id=<{$site_config.field_id}>&key_id=<{$tag.tag_id}><{/if}>">生成</a>| 
        <a href="/wondershare/article.php?action=index&tag_id=<{$tag.tag_id}>&w_type=<{$w_type}>" > 查看相应文章 </a>
    </td>
  </tr>
 <{/foreach}>
  <tr>
	 <td><input name="checkall" value="checked" onclick="v=document.getElementsByName('ID[]');if(this.checked){for(i=0;i<v.length;i++)v[i].checked=true;}else{for(i=0;i<v.length;i++)v[i].checked=false;}" type="checkbox">全选</td>	
		<td colspan="8">&nbsp;&nbsp;<input name="sub" value="删除" type="button" onclick="delete_article(0,'list','tag');">
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<{$page_url}> &nbsp;&nbsp;&nbsp; 共有 <span id="total"><{$total}></span>条记录</td>
	</tr>
  </tbody>
</table>
</body>
</html>